const mysql = require("mysql2/promise"),
      {HOST,USER,PASSWORD,DATABASE} = require("../lib/constant.js");

const con=mysql.createPool({
  host : HOST,
  user : USER,
  charset : 'UTF8_GENERAL_CI',
  password : PASSWORD,
  database : DATABASE
});

class ResData{
  constructor(){
    this.code = 0,
    this.msg = 'ok',
    this.count = 0,
    this.data = '';
  }
}


module.exports = { con, ResData };

